package com.healthcloud.service.screening.impl;

import com.healthcloud.dao.screening.ScreeningBpDao;
import com.healthcloud.entity.screening.ScreeningBpEntity;
import com.healthcloud.entity.screening.ScreeningBpVo;
import com.healthcloud.service.screening.ScreeningBpService;
import com.healthcloud.utils.PageParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 血压筛查
 * @author zhangjie
 */
@Service
public class ScreeningBpServiceImpl implements ScreeningBpService {

    @Autowired
    private ScreeningBpDao screeningBpDao;

    @Override
    public void save(ScreeningBpEntity entity) {
        screeningBpDao.save(entity);
    }

    @Override
    public void update(ScreeningBpEntity entity) {
        screeningBpDao.update(entity);
    }

    @Override
    public ScreeningBpEntity queryByIdCard(String idCard) {
        return screeningBpDao.queryByIdCard(idCard);
    }

    @Override
    public void saveOrUpdate(ScreeningBpEntity entity) {
        if (entity.getId()!=null){
            update(entity);
        }else {
            save(entity);
        }
    }

    @Override
    public List<ScreeningBpVo> queryListVo(ScreeningBpVo entity, PageParam pageParam) {
        return screeningBpDao.queryListVo(entity,pageParam);
    }

    @Override
    public Integer queryTotalVo(ScreeningBpVo entity) {
        return screeningBpDao.queryTotalVo(entity);
    }

    @Override
    public ScreeningBpEntity queryObject(Long id) {
        return screeningBpDao.queryObject(id);
    }

    @Override
    public void deleteBatch(Long[] ids) {
        screeningBpDao.deleteBatch(ids);
    }

    @Override
    public ScreeningBpEntity monthReport(String reportTime, String idCard) {
        return screeningBpDao.monthReport(reportTime, idCard);
    }
}
